﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Code.Models;
using QianBuo.Lottery.Web.Models;
using Code.BLL;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace QianBuo.Lottery.Web.Areas.Manage.Models.Issue
{
    public class SearchIssue
    {
        public SearchIssue_Mod Search { get; set; }
        public List<Code.Models.Issue> IssueList = new List<Code.Models.Issue>();
        public List<SelectListItem> LotteryList = new List<SelectListItem>();
        public PageInfo PageInfo { get; set; }
    }
    #region 添加期号
    public class AddModel
    {
        public AddModel()
        {
            startTime = DateTime.Now.Date;
            Date = 5;
        }
        private DateTime startTime;
        [DisplayName("请选择彩种:")]
        [Required(ErrorMessage="*")]
        public int LotteryID { get; set; }
        [DisplayName("开始时间:")]
        [Required(ErrorMessage = "*")]
        public DateTime StartTime
        {
            get
            {
                return startTime;
            }
            set
            {
                if (value.Year < 1900 || value.Year > 3000)
                    throw new ArgumentException("无较日期");
                startTime = value;
            }
        }
        [DisplayName("天数:")]
        [Required(ErrorMessage="*")]
        public int Date { get; set; }

        public ModelNameValue<int, string> Lotterys { get; set; }

        public bool Success { get; set; }
    }
    #endregion

}